<?php

/**
 * @Author: Wang Chunsheng 2192138785@qq.com
 * @Date:   2020-03-29 20:31:05
 * @Last Modified by:   Wang Chunsheng 2192138785@qq.com
 * @Last Modified time: 2020-03-29 20:55:31
 */


namespace common\addons\diandi_shop\models;

use Yii;

/**
 * This is the model class for table "diandi_shop_goods_label".
 *
 * @property int $id
 * @property string|null $label 商品标签
 * @property string|null $color 标签颜色
 */
class GoodsLabel extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'diandi_shop_goods_label';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['label'], 'string', 'max' => 2],
            [['color'], 'string', 'max' => 10],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'label' => '标签名称',
            'color' => '标签颜色',
        ];
    }
}
